home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 October
/
EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso
/
Aminet
/
comm
/
mail
/
thor201.lha
/
THOR_2.0
/
thor.lha
/
rexx
/
ASCIIPic.fse
< prev
next >
Wrap
Text File
|
1995-05-15
|
1KB
|
48 lines
/* ASCIIPic.fse by Troels Walsted Hansen
** $VER: ASCIIPic.fse v1.02 (03.12.94)
**
** Convert picture to ASCII and include it in the FSE. Uses
** 'ilbm2ascii' v1.4 by Tobias Ferber.
*/
defpath = 'work:pictures/' /* Edit to suit your environment */
options results
/* needs THOR and FSE functions */
if(substr(address(),1,8) ~= "THOR_FSE") then
do
say "This script should only be started from inside the FSE."
exit 20
end
else fseport = address()
p = address() || ' ' || show('P',,)
thorport = pos('THOR.',p)
if thorport > 0 then thorport = word(substr(p,thorport),1)
else
do
say 'No THOR port found!'
exit 10
end
address(thorport)
REQUESTFILE TITLE '"Select ILBM to convert and include:"' ID '"'defpath'"' FP PAT '"#?"'
if(rc ~= 0) then exit
else picfile = result
lastchar = right(picfile,1)
if(rc~=0|lastchar = "/"|lastchar = ":"|picfile = "") then exit
address command "ilbm2ascii "||'"'picfile'"'||" > t:FSEASCIIPicture"
address(fseport)
INCLUDEFILE 't:FSEASCIIPicture'
address command "delete >nil: t:FSEASCIIPicture"
exit